package com.lty.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lty.model.entity.QuartzJob;
import org.quartz.SchedulerException;

public interface QuartzJobService extends IService<QuartzJob> {
    /**
     * 添加定时任务
     */
    void addJob(QuartzJob job) throws SchedulerException;

    /**
     * 更新定时任务
     */
    void updateJob(QuartzJob job) throws SchedulerException;

    /**
     * 删除定时任务
     */
    void deleteJob(String jobId) throws SchedulerException;

    /**
     * 暂停定时任务
     */
    void pauseJob(String jobId) throws SchedulerException;

    /**
     * 恢复定时任务
     */
    void resumeJob(String jobId) throws SchedulerException;

    /**
     * 立即执行定时任务
     */
    void runJobNow(String jobId) throws SchedulerException;
}
